USE [IB_GENEL]
GO

/****** Object:  Table [LOG].[EXCEPTION_LOG]    Script Date: 01/31/2013 14:11:10 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [LOG].[EXCEPTION_LOG](
	[ExceptionLogKey] [int] IDENTITY(1,1) NOT NULL,
	[ExceptionDate] [datetime] NOT NULL,
	[ExceptionLogger] [varchar](50) NOT NULL,
	[UserKey] [int] NOT NULL,
	[UserDepartmentKey] [int] NULL,
	[ClientInformations] [varchar](200) NULL,
	[ServerInformations] [varchar](50) NULL,
	[PageURL] [varchar](150) NOT NULL,
	[MethodName] [varchar](100) NOT NULL,
	[ExceptionMessage] [varchar](250) NOT NULL,
	[ExceptionDetail] [varchar](max) NOT NULL,
 CONSTRAINT [PK_EXCEPTION_LOG] PRIMARY KEY CLUSTERED 
(
	[ExceptionLogKey] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'You can write here code part where exception occured. For example; you can write here "....BaseClass, GlobalAsax, DataAccessLeyer etc.".' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'ExceptionLogger'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Unique identifying information of user who made crud process. This identification may be national ID number or e-mail address. Or anything you want.' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'UserKey'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Department of user who is using system when exception was occured. So, by this information, you can analize, which departmet get more exception then others.' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'UserDepartmentKey'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'You can write here client informations to make easier understanding of cause of exception. You can write here; client IP adress, explorer version, javascript version, cookie is on or off etc.' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'ClientInformations'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'You can write here server informations to make easier understanding of cause of exception. For example you can write here IIS name.' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'ServerInformations'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The Page URL where exception was occured' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'PageURL'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The Method name where exception was occured' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'MethodName'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Exception message. This message can be taken from exception object or it can be custom.' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'ExceptionMessage'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Exception details.' , @level0type=N'SCHEMA',@level0name=N'LOG', @level1type=N'TABLE',@level1name=N'EXCEPTION_LOG', @level2type=N'COLUMN',@level2name=N'ExceptionDetail'
GO

